<?php

namespace app\admin\model\procure;

use think\Model;

/**
 * Purchorderdetails
 */
class Purchorderdetails extends Model
{
    // 表主键
    protected $pk = 'podetailitem';
    
    // 表名
    protected $name = 'procure_purchorderdetails';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;


    public function ordernoTable(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\procure\Purchorders::class, 'orderno', 'orderno');
    }

    public function glcodeTable(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\fm\Chartmaster::class, 'glcode', 'accountcode');
    }
}